<?php $annunci = mysql_query("SELECT * FROM annuncio LIMIT 10");
	if (mysql_num_rows($annunci)){
	while ($content=mysql_fetch_assoc($annunci)){
?>

<tr>
  <td class="date" nowrap="nowrap">
    Il <?php echo date('d/m/Y', $content['data_annuncio']) ?>
  </td>
  <td class="image">


    <table class="clean_table shadowed_thumb" cellpadding="0" cellspacing="0">
      <tbody>
        <tr>
          <td><a href="http://www.subito.it/nautica/imbarcazione-vetroresina-sassari-23385196.htm" title="Imbarcazione vetroresina"><img src="5559219386.jpg" alt="" class="thumb" border="0"></a></td>
          <td class="extra_middle_right" valign="top"><img src="thumb_extra_right_top.gif" width="8" height="8"></td>
        </tr>
        <tr>
          <td class="extra_bottom_center" valign="top"><img src="thumb_extra_left_bottom.gif" width="8" height="8"></td>
          <td valign="top"><img src="thumb_extra_right_bottom.gif"></td>
        </tr>
      </tbody>
    </table>


  </td>
  <td>
    <div class="adtitle">
      <a name="23385196" href="http://www.subito.it/nautica/imbarcazione-vetroresina-sassari-23385196.htm">
        <?php echo $content['titolo'] ?>
      </a><br>€ <?php echo $content['prezzo'] ?>
    </div>

  </td>
  <td class="ctg_and_city">

    <a href="http://www.subito.it/annunci-sardegna/vendita/nautica/sassari/" class="hidden_link">
      <?php
        $qry = "
          SELECT *
          FROM categoria c, annuncio_has_categoria ahc, annuncio a
          WHERE c.id=ahc.categoria_id
          AND ahc.annuncio_id=a.id
          AND a.id= " .$content['id']."<br />\n"; 

        
$result = mysql_query($qry);
if (mysql_num_rows($result))
{
while ($content = mysql_fetch_assoc($result))
{
	echo $content['descrizione'];
}
} ?>



   </a>

 </td>
</tr>
<?php }
}?>


